package com.example.consumer.mq;

import com.example.consumer.utils.DateTimeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

/**
 * 反馈生产者
 */
@Component
public class FeedBackProducer {

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    @Autowired
    private Queue feedbackQueue;

    public void feedback() {
        jmsMessagingTemplate.convertAndSend(feedbackQueue, "反馈队列：已经处理" + DateTimeUtil.getCurrentDateTime());
    }
}
